package com.domdd.model;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;

import java.io.Serializable;
import java.util.Date;

@Data
@TableName(value = "inventory_new")
@Slf4j
public class InventoryNew implements Serializable {
    @TableId(type = IdType.AUTO)
    @JSONField(serialize = false)
    @ApiModelProperty(value = "id 主键", hidden = true)
    private Long id;

    @ApiModelProperty(value = "商品编码")
    private String outerId;

    @ApiModelProperty(value = "规格条码")
    private String barcode;

    @ApiModelProperty(value = "商品名称")
    private String goodsName;

    @ApiModelProperty(value = "规格名称")
    private String skuName;

    @ApiModelProperty(value = "良品库存")
    private Integer normalQuantity;

    @ApiModelProperty(value = "残次品")
    private Integer substandardQuantity;

    @ApiModelProperty(value = "残品")
    private Integer brokenQuantity;

    @ApiModelProperty(value = "盒损")
    private Integer boxBrokenQuantity;

    @ApiModelProperty(value = "总库存")
    private Integer quantity;

    @ApiModelProperty(value = "库存日期")
    private Date inventoryDate;

    @ApiModelProperty(value = "创建时间")
    private Date createdTime;

    @ApiModelProperty(value = "更新时间")
    private Date lastUpdatedTime;

    public String getShopCode() {
        return "defaultShopCode";
    }

    public String getProductCode() {
        return outerId;
    }

    public String getProductUnit() {
        return "个";
    }

    @ApiModelProperty(value = "门店编码")
    @TableField(exist = false)
    private String shopCode;
    @ApiModelProperty(value = "产品编码")
    @TableField(exist = false)
    private String productCode;
    @ApiModelProperty(value = "产品单位")
    @TableField(exist = false)
    private String productUnit = "个";
    @ApiModelProperty(value = "仓库类型")
    @TableField(exist = false)
    private String warehouseType = "拼多多旗舰店仓";
    @ApiModelProperty(value = "门店名称")
    @TableField(exist = false)
    private String shopName = "拼多多旗舰店";
}